<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>

<s:actionerror />
<s:actionmessage />
<s:fielderror />
<br />
<h1>Tab3 标头管理
<div class="f-link">
<a href="javascript:_addMemo();" onclick="">示意图</a>
<a href="javascript:void(0);" onclick="document.formObj.submit();return false;">搜寻</a>
<a href="view.do?categoryId=0">首页Tab3维护</a>
</div>
</h1>
<script language="javascript">
var d1;
	$().ready( function() {
		d1 = $("#dialog1").dialog({
			bgiframe: true,
			autoOpen: false,
			height: 400,
			width:300,
			modal: true
		});
		if ("0"=="${paramLevel[0]}")
		  $('#paramLevel-1').attr("checked",true);
		if ("1"=="${paramLevel[0]}")
			  $('#paramLevel-2').attr("checked",true);
		if ("1"=="${paramLevel[1]}")
			  $('#paramLevel-2').attr("checked",true);		  
	});	

	function _addMemo() {
		d1.dialog('open');
	}
</script>
<DIV id="dialog1" title="3tab示意图" class="consignee">
<img alt="3tab示意图" src="/eventImg/3tab.jpg"><BR></BR>
<input type=button name="s2" value="关闭" onClick="d1.dialog('close');"></input>
</DIV>
<div class="data-form">
<s:form action="tab3/search.do" method="post" name="formObj">
<table width="750">
<tr>
	<td width="15%">阶层：</td>
	<td width="35%"><s:checkboxlist list="#{'0':'馆首页', '1':'目录1'}" name="paramLevel"/></td>
	<td width="15%">目录名称：</td>
	<td width="35%"><s:textfield name="paramName"/></td>
</tr>
</table>
</s:form>
</div>
<br/><br/>
	<table class="tb-1" width="100%">
		<thead>
			<tr>
				<th>#</th>
				<th>名称</th>
				<th>昵称</th>
				<th>阶层</th>
			</tr>
		</thead>
		<s:if test="categoryList.size > 0">
		<tbody>
			<c:forEach items="${categoryList}" var="category" varStatus="rows_index">
				<tr class="${rows_index.count % 2 == 0 ? 'bg-yl' : ''}">
					<td><fmt:formatNumber
						pattern="0000" value="${rows_index.count + pager.currentPage*20}" /></td>
					<td><a href="view.do?categoryId=${category.id}" />${category.name}</a></td>
					<td><c:out value="${category.aliasName}"/></td>
					<td><c:out value="${category.level}"/></td>
				</tr>
			</c:forEach>
		</tbody>
		</s:if>
		<s:else>
			<tbody>
				<tr class="bg-yl"><td colspan="6">查无资料!!</td></tr>
			</tbody>
		</s:else>
	</table>	
	<yaodian100:pageutil link="search.do" pagerObj="${pager}" />
